<!doctype html>
<html>

<head>
	<meta charset="utf-8">
	<meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
	<meta name="format-detection" content="telephone=no" />
	<title>首页</title>
	<link rel="stylesheet" type="text/css" href="../c/aui.css" />
	<style>

	</style>
</head>

<body>

</body>
<script type="text/javascript" src="../j/api.js"></script>
<script type="text/javascript">
	var UIScrollPlayer
	apiready = function() {
		UIScrollPlayer = api.require('UIScrollPlayer');
		UIScrollPlayer.addEventListener(function(ret, err) {
			console.log('scrollVideo监听：' + JSON.stringify(ret));
		});
		data();
	}

	function openScrollVideo(data) {
		UIScrollPlayer.open({
			rect: {
				x: 0,
				y: 0,
				w: api.winWidth,
				h: api.winHeight
			},
			videos: data,
		}, function(ret, err) {
			console.log(JSON.stringify(ret) + "   " + JSON.stringify(err));
		});
	}
	function data() {
		_ajax('video/lists/limit/15',function(ret,err){
			if(ret){
				openScrollVideo(ret.datas);
				console.log(JSON.stringify(ret.datas))
			}
		})
	}
</script>

</html>
